package com.baitiaojun.api.exception;

import lombok.Getter;
import lombok.Setter;
import org.springframework.http.HttpStatus;

/**
 * @类名 ConditionException
 * @描述
 * @作者 白条君
 * @创建日期 2022/10/25 17:24
 * @版本 1.0
 */
@Setter
@Getter
public class ConditionException extends Exception {

    private int code;

    public ConditionException() {
       super();
    }

    public ConditionException(String msg) {
        super(msg);
        this.code = HttpStatus.INTERNAL_SERVER_ERROR.value();
    }

    public ConditionException(int code, String msg) {
        super(msg);
        this.code = code;
    }
}